Unchecked Exceptions Can Be Strictly More Powerful Than Call/CC
نویسنده
چکیده
We demonstrate that in the context of statically-typed purely-functional lambda calculi without recursion, unchecked exceptions (e.g., SML exceptions) can be strictly more powerful than call/cc. More precisely, we prove that a natural extension of the simply-typed lambda calculus with unchecked exceptions is strictly more powerful than all known sound extensions of Girard’s Fω (a superset of the simply-typed lambda calculus) with call/cc. This result is established by showing that the first language is Turing complete while the later languages permit only a subset of the recursive functions to be written. We show that our natural extension of the simply-typed lambda calculus with unchecked exceptions is Turing complete by reducing the untyped lambda calculus to it by means of a novel method for simulating recursive types using unchecked-exception–returning functions. The result concerning extensions of Fω with call/cc stems from previous work of the author and Robert Harper.
منابع مشابه
Exceptions Are Strictly More Powerful Than Call/CC
We demonstrate that in the context of statically typed pure functional lambda calculi, exceptions are strictly more powerful than call/cc. More precisely, we prove that the simply typed lambda calculus extended with exceptions is strictly more powerful than Girard's F ! [6, 15] (a superset of the simply typed lambda calculus) extended with call/cc and abort. This result is established by showin...
متن کاملUnchecked Exceptions: Can the Programmer be Trusted to Document Exceptions?
The emergence of exception handling mechanisms in modern programming languages made available a different way of communicating errors between procedures. For years, programmers trusted in the correct documentation for error codes returned by procedures to correctly handle erroneous situations. Now, they have to focus on the documentation of exceptions for the same effect. But to which extent ca...
متن کاملSound reasoning about unchecked exceptions: soundness proof
In this note we formalize a multithreaded Java-like programming language with unchecked exceptions, try-catch blocks, and synchronized blocks, as well as method contracts, object invariants, block invariants, thread-local objects, and parallel execution statements. We further formalize our verification condition generation-based modular static verification approach that verifies that the progra...
متن کاملEfficient and Effective Handling of Exceptions in Java Points-to Analysis
A joint points-to and exception analysis has been shown to yield benefits in both precision and performance. Treating exceptions as regular objects, however, incurs significant and rather unexpected overhead. We show that in a typical joint analysis most of the objects computed to flow in and out of a method are due to exceptional control-flow and not normal call-return control-flow. For instan...
متن کاملDelimiting the Scope of Eeects
Program fragments in functional languages may be observationally congruent in a language without eeects (continuations, state, exceptions) but not in an extension with eeects. We give a generic way to preserve pure functional congruences by means of an eeects delimiter. The eeects delimiter is deened semantically using the retraction techniques of 14], but can also be given an operational seman...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Higher-Order and Symbolic Computation
دوره 12 شماره
صفحات -
تاریخ انتشار 1999